local skynet = require "skynet"

local function test1()
	local h1 =  skynet.newservice("work1","work001","10086")
	local h2 =  skynet.newservice("work1","work002","1008611")
	local h3 =  skynet.uniqueservice("work1","work003","1008612")
	local h33 =  skynet.uniqueservice("work1","work004","1008613") -- 
	skynet.error("h1",h1,"h2",h2,"h3",h3,"h33",h33)
end

local function test2()
	local h1 =  skynet.uniqueservice("work1","work001","10086")
	local h2 =  skynet.uniqueservice("work1","work002","1008611")
	local h3 =  skynet.uniqueservice(true,"work1","work003","1008612")
	skynet.error("h1",h1,"h2",h2,"h3",h3)
	local h33 = skynet.queryservice("work1")
	local h333 = skynet.queryservice(true,"work1")
	skynet.error("h33",h33,"h333",h333)
end

skynet.start(function()
	skynet.error("[service main] start")

	skynet.error("-----------test service begin--------------")
	--test1();
	test2();
	skynet.error("-----------test service end--------------")	
	skynet.error("[service main] end")
	skynet.exit()
end)